// 获取位移和应变数据
export function getDisplacement() {
  return {
    url: "/generator/displacement/getDisplacement",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      data: {
        displacement: [
          // 第一条曲线数据
          [
            [-50, 0],
            [-45, 1],
            [-40, 2],
            [-35, 3],
            [-30, 4],
            [-25, 5],
            [-20, 6],
            [-15, 7],
            [-10, 8],
            [-5, 9],
            [0, 10],
            [5, 11],
            [10, 12],
            [15, 13],
            [20, 14],
            [25, 15],
            [30, 16],
            [35, 17],
            [40, 18],
            [45, 19],
            [50, 20]
          ],
          // 第二条曲线数据
          [
            [-40, 0],
            [-35, 1],
            [-30, 2],
            [-25, 3],
            [-20, 4],
            [-15, 5],
            [-10, 6],
            [-5, 7],
            [0, 8],
            [5, 9],
            [10, 10],
            [15, 11],
            [20, 12],
            [25, 13],
            [30, 14],
            [35, 15],
            [40, 16],
            [45, 17],
            [50, 18],
            [55, 19],
            [60, 20]
          ]
        ],
        legend: ["位移曲线1", "位移曲线2"]
      },
      dataStrain: {
        wavelength: [
          // 第一条应变曲线数据
          [
            [-100, 0],
            [-90, 1],
            [-80, 2],
            [-70, 3],
            [-60, 4],
            [-50, 5],
            [-40, 6],
            [-30, 7],
            [-20, 8],
            [-10, 9],
            [0, 10],
            [10, 11],
            [20, 12],
            [30, 13],
            [40, 14],
            [50, 15],
            [60, 16],
            [70, 17],
            [80, 18],
            [90, 19],
            [100, 20]
          ],
          // 第二条应变曲线数据
          [
            [-80, 0],
            [-70, 1],
            [-60, 2],
            [-50, 3],
            [-40, 4],
            [-30, 5],
            [-20, 6],
            [-10, 7],
            [0, 8],
            [10, 9],
            [20, 10],
            [30, 11],
            [40, 12],
            [50, 13],
            [60, 14],
            [70, 15],
            [80, 16],
            [90, 17],
            [100, 18],
            [110, 19],
            [120, 20]
          ]
        ],
        legend: ["应变曲线1", "应变曲线2"]
      }
    }
  };
}

// 获取监测点选项
export function getMeasurePoint() {
  return {
    url: "/generator/switchtofbgconfig/getMeasurePoint",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      list: [
        {
          value: 1,
          label: "监测点1"
        },
        {
          value: 2,
          label: "监测点2"
        },
        {
          value: 3,
          label: "监测点3"
        }
      ]
    }
  };
}

// 获取监测段选项
export function getPartOption() {
  return {
    url: "/generator/switchtofbgconfig/getPartOption",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      list: [
        {
          value: 1,
          label: "第1段"
        },
        {
          value: 2,
          label: "第2段"
        },
        {
          value: 3,
          label: "第3段"
        },
        {
          value: 4,
          label: "第4段"
        },
        {
          value: 5,
          label: "第5段"
        }
      ]
    }
  };
}

// 获取测量方向选项
export function getFaceOption() {
  return {
    url: "/generator/switchtofbgconfig/getFaceOption",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      list: [
        {
          value: 0,
          label: "正面"
        },
        {
          value: 1,
          label: "反面"
        }
      ]
    }
  };
}

// 获取振幅数据列表
export function getAmplitudeList() {
  return {
    url: "/generator/amplitude/list",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      page: {
        totalCount: 3,
        pageSize: 8,
        totalPage: 1,
        currPage: 1,
        list: [
          {
            measureId: 1,
            measurePoint: 1,
            partId: 1,
            face: 0,
            data: "光谱数据1",
            gmtCreate: "2024-03-20 10:00:00"
          },
          {
            measureId: 2,
            measurePoint: 2,
            partId: 2,
            face: 1,
            data: "光谱数据2",
            gmtCreate: "2024-03-20 11:00:00"
          },
          {
            measureId: 3,
            measurePoint: 3,
            partId: 3,
            face: 0,
            data: "光谱数据3",
            gmtCreate: "2024-03-20 12:00:00"
          }
        ]
      }
    }
  };
}

// 重置系统
export function resetSystem() {
  return {
    url: "/data/resetSystem",
    type: "post",
    data: {
      msg: "success",
      code: 0
    }
  };
}

// 获取测点对应的深度选项
export function getDeepByMeasurePoint() {
  return {
    url: "/generator/sensor/getDeepByMeasurePoint",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      list: [
        {
          value: 0,
          label: "0米"
        },
        {
          value: 5,
          label: "5米"
        },
        {
          value: 10,
          label: "10米"
        },
        {
          value: 15,
          label: "15米"
        },
        {
          value: 20,
          label: "20米"
        }
      ]
    }
  };
}

// 获取位移数据
export function getDisplacementData() {
  return {
    url: "/generator/displacement/get/displacement/data",
    type: "post",
    data: {
      msg: "success",
      code: 0,
      resVo: {
        xdataForDisplacement: [
          "2025-04-02 01:00:21",
          "2025-04-03 01:00:21",
          "2025-04-04 01:00:21",
          "2025-04-05 01:00:21",
          "2025-04-06 01:00:21",
          "2025-04-07 01:00:21",
          "2025-04-08 01:00:21",
          "2025-04-09 01:00:21",
          "2025-04-10 01:00:21",
          "2025-04-11 01:00:21"
        ],
        ydataForDisplacement: [-50, -45, -40, -35, -30, -25, -20, -15, -10, -5]
      }
    }
  };
}

// 获取位移变化率数据
export function getConrateData() {
  return {
    url: "/generator/conrate/get/conrate/data",
    type: "post",
    data: {
      msg: "success",
      code: 0,
      resVo: {
        xdataForConRate: [
          "2025-04-02 01:00:21",
          "2025-04-03 01:00:21",
          "2025-04-04 01:00:21",
          "2025-04-05 01:00:21",
          "2025-04-06 01:00:21",
          "2025-04-07 01:00:21",
          "2025-04-08 01:00:21",
          "2025-04-09 01:00:21",
          "2025-04-10 01:00:21",
          "2025-04-11 01:00:21"
        ],
        ydataForConRate: [-2.5, -2.0, -1.5, -1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0]
      }
    }
  };
}

// 获取单个振幅数据
export function getOneAmplitude() {
  return {
    url: "/generator/amplitude/getOneAmplitude",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      xData: [
        1520,
        1521,
        1522,
        1523,
        1524,
        1525,
        1526,
        1527,
        1528,
        1529,
        1530,
        1531,
        1532,
        1533,
        1534,
        1535,
        1536,
        1537,
        1538,
        1539,
        1540,
        1541,
        1542,
        1543,
        1544,
        1545,
        1546,
        1547,
        1548,
        1549,
        1550,
        1551,
        1552,
        1553,
        1554,
        1555,
        1556,
        1557,
        1558,
        1559,
        1560,
        1561,
        1562,
        1563,
        1564,
        1565,
        1566,
        1567,
        1568,
        1569
      ],
      yData: [
        1000,
        2000,
        3000,
        4000,
        5000,
        6000,
        7000,
        8000,
        9000,
        10000,
        11000,
        12000,
        13000,
        14000,
        15000,
        16000,
        17000,
        18000,
        19000,
        20000,
        21000,
        22000,
        23000,
        24000,
        25000,
        26000,
        27000,
        28000,
        29000,
        30000,
        31000,
        32000,
        33000,
        34000,
        35000,
        36000,
        37000,
        38000,
        39000,
        40000,
        41000,
        42000,
        43000,
        44000,
        45000,
        46000,
        47000,
        48000,
        49000,
        50000
      ]
    }
  };
}

// 获取解调日志列表
export function getDemodulateLogList() {
  return {
    url: "/generator/demodulatelog/list",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      page: {
        totalCount: 6,
        pageSize: 10,
        totalPage: 1,
        currPage: 1,
        list: [
          {
            id: 1,
            description:
              "数据ID为524,第1号监测点下5号桩段,当前温度为12.7 (fbsm端补偿的正温度测试长为)(nm)<br/>[1545.0941, 1548.7743, 1551.8987, 1555.0209, 1558.1609]<br/>fbsm端补偿的反面测试长为)(nm)<br/>[1545.0941, 1548.7743, 1551.8987, 1555.0209, 1558.1609]<br/>波长初始读长率在正反面测长率为(ppm)<br/>[0.0, 0.0, 0.0, 0.0, 0.0]",
            gmtCreate: "2023-02-03 17:01:49"
          },
          {
            id: 2,
            description:
              "数据ID为524,第1号监测点下5号桩段,当前温度为12.7 (fbsm端补偿的正温度测试长为)(nm)<br/>[1545.5111, 1548.9946, 1551.9588, 1554.981, 1557.7058]<br/>fbsm端补偿的反面测试长为)(nm)<br/>[1546.1953, 1549.098, 1551.649, 1554.6351, 1558.1423]<br/>波长初始读长率在正反面测长率为(ppm)<br/>[1.1537, -0.9396, 0.12, 1.7715, 0.9833]",
            gmtCreate: "2023-02-03 17:01:13"
          },
          {
            id: 3,
            description:
              "数据ID为524,第1号监测点下5号桩段,当前温度为12.7 (fbsm端补偿的正温度测试长为)(nm)<br/>[1545.0912, 1548.7835, 1551.8932, 1555.0617, 1558.1385]<br/>fbsm端补偿的反面测试长为)(nm)<br/>[1546.1541, 1548.9599, 1551.6777, 1554.8562, 1558.0261]<br/>波长初始读长率在正反面测长率为(ppm)<br/>[-0.4902, 2.9123, 1.6032, -3.5223, -2.3013]",
            gmtCreate: "2023-02-03 17:01:02"
          },
          {
            id: 4,
            description:
              "数据ID为524,第1号监测点下5号桩段,当前温度为12.7 (fbsm端补偿的正温度测试长为)(nm)<br/>[1530.7332, 1533.85, 1537.0873, 1539.7237, 1542.7332]<br/>fbsm端补偿的反面测试长为)(nm)<br/>[1531.1249, 1533.8974, 1536.7376, 1539.9515, 1542.8116]<br/>波长初始读长率在正反面测长率为(ppm)<br/>[-3.7588, -0.2244, -0.1228, 0.8965, 0.8447]",
            gmtCreate: "2023-02-03 17:00:50"
          },
          {
            id: 5,
            description:
              "数据ID为524,第1号监测点下5号桩段,当前温度为12.7 (fbsm端补偿的正温度测试长为)(nm)<br/>[1530.7654, 1533.757, 1536.6442, 1539.8192, 1542.7358]<br/>fbsm端补偿的反面测试长为)(nm)<br/>[1531.0988, 1534.0001, 1536.6621, 1539.8179, 1542.7762]<br/>波长初始读长率在正反面测长率为(ppm)<br/>[-1.2348, -2.0267, 0.6345, 0.3725, -3.6302]",
            gmtCreate: "2023-02-03 17:00:39"
          },
          {
            id: 6,
            description:
              "数据ID为524,第1号监测点下5号桩段,当前温度为12.7 (fbsm端补偿的正温度测试长为)(nm)<br/>[1545.0941, 1548.7743, 1551.8987, 1555.0209, 1558.1609]<br/>fbsm端补偿的反面测试长为)(nm)<br/>[1545.0941, 1548.7743, 1551.8987, 1555.0209, 1558.1609]",
            gmtCreate: "2023-02-03 17:00:27"
          }
        ]
      }
    }
  };
}

// 删除解调日志
export function deleteDemodulateLog() {
  return {
    url: "/generator/demodulatelog/delete",
    type: "post",
    data: {
      msg: "success",
      code: 0
    }
  };
}

// 获取光栅选项
export function getFbgOption() {
  return {
    url: "/generator/switchtofbgconfig/getFbgOption",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      list: [
        {
          value: 0,
          label: "FBG1"
        },
        {
          value: 1,
          label: "FBG2"
        },
        {
          value: 2,
          label: "FBG3"
        },
        {
          value: 3,
          label: "FBG4"
        },
        {
          value: 4,
          label: "FBG5"
        }
      ]
    }
  };
}

// 获取位移数据列表
export function getDisplacementList() {
  return {
    url: "/generator/displacementtofbg/list",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      page: {
        totalCount: 5,
        pageSize: 10,
        totalPage: 1,
        currPage: 1,
        list: [
          {
            measureId: 1,
            measurePoint: 1,
            partId: 1,
            fbgId: 0,
            deep: 10,
            displacement: 0.15,
            gmtCreate: "2024-03-20 10:00:00"
          },
          {
            measureId: 2,
            measurePoint: 1,
            partId: 2,
            fbgId: 1,
            deep: 20,
            displacement: 0.25,
            gmtCreate: "2024-03-20 10:05:00"
          },
          {
            measureId: 3,
            measurePoint: 2,
            partId: 1,
            fbgId: 0,
            deep: 15,
            displacement: 0.18,
            gmtCreate: "2024-03-20 10:10:00"
          },
          {
            measureId: 4,
            measurePoint: 2,
            partId: 2,
            fbgId: 1,
            deep: 25,
            displacement: 0.22,
            gmtCreate: "2024-03-20 10:15:00"
          },
          {
            measureId: 5,
            measurePoint: 3,
            partId: 1,
            fbgId: 0,
            deep: 30,
            displacement: 0.3,
            gmtCreate: "2024-03-20 10:20:00"
          }
        ]
      }
    }
  };
}

// 删除位移数据
export function deleteDisplacement() {
  return {
    url: "/generator/displacementtofbg/delete",
    type: "post",
    data: {
      msg: "success",
      code: 0
    }
  };
}

// 获取历史基准列表
export function getHistoryBenchmarkList() {
  return {
    url: "/generator/historybenchmark/list",
    type: "get",
    data: {
      msg: "success",
      code: 0,
      page: {
        totalCount: 3,
        pageSize: 10,
        totalPage: 1,
        currPage: 1,
        list: [
          {
            measurePoint: 1,
            measureId: 101,
            setTime: "2024-03-20 09:00:00"
          },
          {
            measurePoint: 2,
            measureId: 102,
            setTime: "2024-03-20 09:30:00"
          },
          {
            measurePoint: 3,
            measureId: 103,
            setTime: "2024-03-20 10:00:00"
          }
        ]
      }
    }
  };
}

// 删除历史基准
export function deleteHistoryBenchmark() {
  return {
    url: "/generator/historybenchmark/delete",
    type: "post",
    data: {
      msg: "success",
      code: 0
    }
  };
}
